package com.paic.mhis.hcpms.productClear.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.paic.mhis.hcpms.productClear.dto.ProductClearDTO;
import com.paic.pafa.biz.dao.BaseDAO;

@Component("productClearDAO")
public class ProductClearDAO extends BaseDAO{
	
	
	/**
	 * 根据参数分页加载对应的产品结算表信息
	 * @param parameter
	 * @return
	 */
	public List<ProductClearDTO> queryProductClearDTOList(Map<String,Object> parameter){
		
		List<ProductClearDTO> list=(List<ProductClearDTO>) this._queryForList("producClear.queryProductClearDTO", parameter);
		     return list;
		
		
	}

	/**
	 * 根据参数分页加载对应的产品结算表的总记录数
	 * @param parameter
	 * @return
	 */
    public long queryProductClearDTOCount(Map<String,Object> parameter){
    	
    	long count=this._queryForCount("producClear.queryProductClearDTOCount", parameter);
    	    return count;
		
	}
    
    /**
     * 保存产品结算
     * @param bean
     */
    public void insertProductClearBean(ProductClearDTO bean){
    	this._insert("producClear.saveProductClearDTOInfo",bean);
    }
    
    public void updateAuditCaseInfo(String status,String code){
    	Map<String,Object> map=new HashMap<String,Object>();
    	  map.put("caseState",status);
    	  map.put("caseCode",code);
    	this._update("producClear.updateAuditCaseInfo",map);
    	
    }
    
    
    public void updateWaringInfo(String status,String code){
    	Map<String,Object> map=new HashMap<String,Object>();
	  	  map.put("caseState",status);
	  	  map.put("warnNo",code);
    	this._update("producClear.updateWaringInfo",map);
    }
    
    

	
}
